<?php

//验证相关的配置文件

return [
    'account_login'        => [ //账号密码登录
        'account'  => [
            'name'    => '账号或手机',
            'rules'   => 'required',
            'message' => ['required' => '账号或手机不能为空'],
        ],
        'password' => [
            'name'    => '密码',
            'rules'   => 'required',
            'message' => ['required' => '密码不能为空'],
        ],
    ],
    'quick_login'          => [ //快捷登录
        'phone' => [
            'name'    => '手机号码',
            'rules'   => 'required|regex:/^1[345789]\d{9}$/',
            'message' => ['required' => '请填写手机号码', 'regex' => '请填写正确的手机号码'],
        ],
        'code'  => [
            'name'    => '验证码',
            'rules'   => 'required',
            'message' => ['required' => '请填写验证码'],
        ],
    ],
    'register_account'     => [ //注册
        'phone'    => [
            'name'    => '手机号码',
            'rules'   => 'required|regex:/^1[345789]\d{9}$/',
            'message' => ['required' => '请填写手机号码', 'regex' => '请填写正确的手机号码'],
        ],
        'code'     => [
            'name'    => '验证码',
            'rules'   => 'required',
            'message' => ['required' => '请填写验证码'],
        ],
        'password' => [
            'name'    => '密码',
            'rules'   => 'required',
            'message' => ['required' => '请填写密码'],
        ],
        'repass'   => [
            'name'    => '重复密码',
            'rules'   => 'required',
            'message' => ['required' => '请填写重复密码'],
        ],
    ],
    'modify_password'      => [ //修改登录密码
        'user_id'  => [
            'name'    => '用户id',
            'rules'   => 'required',
            'message' => ['required' => '用户id必须'],
        ],
        'phone'    => [
            'name'    => '手机号码',
            'rules'   => 'required|regex:/^1[345789]\d{9}$/',
            'message' => ['required' => '请填写手机号码', 'regex' => '请填写正确的手机号码'],
        ],
        'code'     => [
            'name'    => '验证码',
            'rules'   => 'required',
            'message' => ['required' => '请填写验证码'],
        ],
        'password' => [
            'name'    => '密码',
            'rules'   => 'required',
            'message' => ['required' => '请填写密码'],
        ],
        'repass'   => [
            'name'    => '重复密码',
            'rules'   => 'required',
            'message' => ['required' => '请填写重复密码'],
        ],
    ],
    'add_delivery_address' => [ //添加收货地址
        'name'         => [
            'name'    => '收货人姓名',
            'rules'   => 'required',
            'message' => ['required' => '请填写收货人姓名'],
        ],
        'phone'        => [
            'name'    => '收货人电话',
            'rules'   => 'required|regex:/^1[345789]\d{9}$/',
            'message' => ['required' => '请填写收货人电话', 'regex' => '请填写正确的手机号码'],
        ],
        'address_name' => [
            'name'    => '省市区地址',
            'rules'   => 'required',
            'message' => ['required' => '请填写省市区地址'],
        ],
        'details'      => [
            'name'    => '详细地址',
            'rules'   => 'required',
            'message' => ['required' => '请填写详细地址'],
        ],
        'zip_code'      => [
            'name'    => '邮政编码',
            'rules'   => 'required',
            'message' => ['required' => '请填写邮政编码'],
        ],
    ],
];
